const myBehaviors = require("../../behaviors/myBehaviors")

// components/useslot/useslot.js
Component({
  behaviors: [myBehaviors],
  options: {
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {
    count: {
      type:Number,
      value: 10
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    clickAdd() {
      this.setData({
        count: this.data.count + 1
      })
      // 触发自定义事件，值传递给父组件
      this.triggerEvent("sync",this.data.count)
    }
  },
  lifetimes: {
    created() {
      console.log(this.data.username)
    }
  }
})
